package com.demo.aty.component;

import com.binioter.guideview.MyApplication;
import com.binioter.guideview.viewComment;
import com.demo.aty.ResourceTable;
import ohos.agp.components.Component;
import ohos.agp.components.DirectionalLayout;
import ohos.agp.components.LayoutScatter;
import ohos.agp.window.dialog.ToastDialog;

public class LottieComponent implements viewComment {
    @Override
    public Component getView(LayoutScatter inflater) {
        DirectionalLayout ll = (DirectionalLayout) inflater.parse(ResourceTable.Layout_layer_lottie, null, false);
        ll.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                new ToastDialog(MyApplication.getInstance()).setText("999").show();
            }
        });
        return ll;
    }

    @Override
    public int getAnchor() {
        return viewComment.ANCHOR_TOP;
    }

    @Override
    public int getFitPosition() {
        return viewComment.FIT_CENTER;
    }

    @Override
    public int getXOffset() {
        return 0;
    }

    @Override
    public int getYOffset() {
        return 20;
    }
}
